package com.lam.common.pay.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.lam.common.utils.SpringUtils;

@Component
public class DvyConfig {

	@Value("${dvyUrl}")
	private String dvyUrl;
	
	private static DvyConfig dvyConfig;
	
	public static DvyConfig me() {
		if(dvyConfig == null) {
			dvyConfig = SpringUtils.getBean(DvyConfig.class);
		}
		return dvyConfig;
	}
	
	public static String getDvyUrl(String dvyFlowNo, String dvyCode) {
		return me().dvyUrl.replace("{dvyFlowNo}", dvyFlowNo).replace("{dvyCode}", dvyCode);
	}
}
